/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.mzk.oai.metadataRepository.repository.records;

import cz.mzk.oai.metadataRepository.metadata.MetadataFormat;
import cz.mzk.oai.metadataRepository.repository.Identifier;

/**
 *
 * @author martin
 */
public class NoSuchRecordException extends Exception {

    private static String buildErrorMessage(Identifier itemId, MetadataFormat format) {
        return "id: " + itemId.toString() + ", format: " + format.toString();
    }

    /**
     * Creates a new instance of <code>NoSuchRecordException</code> without detail message.
     */
    public NoSuchRecordException(Identifier itemId, MetadataFormat format) {
        super(buildErrorMessage(itemId, format));
    }
}
